package com.homework.question2;

/**
 * @ClassName Rectangle
 * @Description TODO
 * @Author hp
 * @Date 2021/6/16 18:03
 * @Version 1.0
 **/
public class Rectangle implements Graphic {
    private double length;
    private double width;

    public Rectangle(double length, double width) {
        this.length = length;
        this.width = width;
    }

    public double getLength() {
        return length;
    }

    public void setLength(double length) {
        this.length = length;
    }

    public double getWidth() {
        return width;
    }

    public void setWidth(double width) {
        this.width = width;
    }

    @Override
    public double area() {
        return length*width;
    }
}
